//
//  GCCommentHeaderView.m
//  GoldChampion
//
//  Created by Mac on 2018/4/13.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "GCCommentHeaderView.h"
@interface GCCommentHeaderView()
@property(nonatomic, strong) STButton     *iconButton;
@property(nonatomic, strong) STLabel     *titleLable;
@property(nonatomic, strong) STLabel     *desLable;
@property(nonatomic, strong) STLabel     *timeLable;
@end
@implementation GCCommentHeaderView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithReuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}

+ (CGFloat)headerHeight{
    return 80;
}
#pragma mark --subView
- (void)configSubView{
    self.iconButton = [[STButton alloc] initWithFrame:CGRectMake(15, 10, 60, 60)
                                                title:nil
                                           titleColor:nil
                                            titleFont:0
                                         cornerRadius:30
                                      backgroundColor:nil
                                      backgroundImage:[UIImage imageNamed:@"4"]
                                                image:nil];
    [self addSubview:self.iconButton];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right + 10,10, UIScreenWidth - self.iconButton.right, 30)
                                                     text:@"stoneobs"
                                                textColor:FirstTextColor
                                                     font:15
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    self.titleLable = titleLable;
    [self addSubview:self.titleLable];
    
    STLabel * desLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right+ 10,self.titleLable.bottom, UIScreenWidth - self.iconButton.right, 30)
                                                   text:@"借了头发后，洗头防变吗"
                                              textColor:SecendTextColor
                                                   font:12
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentLeft];
    self.desLable = desLable;
    self.desLable.bottom = [[self class] headerHeight] - 10;
    [self addSubview:self.desLable];
    
    STLabel * timeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right+10,self.desLable.bottom, 100, 20)
                                                    text:@"15分钟前"
                                               textColor:SecendTextColor
                                                    font:12
                                             isSizetoFit:NO
                                           textAlignment:NSTextAlignmentRight];
    self.timeLable = timeLable;
    self.timeLable.centerY = self.titleLable.centerY;
    self.timeLable.right = UIScreenWidth - 15;
    [self addSubview:self.timeLable];
}
@end
